﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AHMHRIRSF04.aspx.cs" Inherits="apps_ahmic_pages_AHMHRIRSF04" %>
<div class="form-outer">
    <div class="form-header" id="formHeader" runat="server">
    </div>
    <div class="sub-pages" id="formContentOuter" runat="server">
        <div class="sub-page sub-page-default" data-section="form" data-path="Ide Proposal>Registrasi Ide Proposal">
            <div class="form-block grid">  
                <div class="row">     
                <div class="span6">
	                <label>Tanggal diterima</label>
                    <div class="input-control text" data-role="datepicker">
		                <input type="text" name="dsubmitted">
		                <button class="btn-date"></button>
	                </div>
	                <label>NRP</label>
	                <div class="input-control text" data-role="input-control">
		                <input type="text" name="vnrp" value="" maxlength="5">
		                <button class="btn-lookup" onclick="ahmhrirsf04_openMemberLookup(this)" ></button>
	                </div>
                    <label>Nama</label>
	                <div class="input-control text" data-role="input-control">
		                <input type="text" name="vnama" value="">
		                <button class="btn-lookup" onclick="ahmhrirsf04_openMemberLookup(this)" ></button>
	                </div>
	                <label>Golongan</label>
	                <div class="input-control text" data-role="input-control">
		                <input type="text" name="ngolongan" value="" disabled="disabled">
		                <button class="btn-clear" tabindex="-1"></button>
	                </div>
	                <label>Area</label>
	                <div class="input-control text" data-role="input-control">
		                <input type="text" name="varea" value="" disabled="disabled">
		                <button class="btn-clear" tabindex="-1"></button>
	                </div>
	                <label>Direktorat</label>
	                <div class="input-control text" data-role="input-control">
		                <input type="text" name="vdirektorat" value="" disabled="disabled">
		                <button class="btn-clear" tabindex="-1"></button>
	                </div>
	                <label>Divisi</label>
	                <div class="input-control text" data-role="input-control">
		                <input type="text" name="vdivisi" value="" disabled="disabled">
		                <button class="btn-clear" tabindex="-1"></button>
	                </div>
	                <label>Departemen</label>
	                <div class="input-control text" data-role="input-control">
		                <input type="text" name="vdepartment" value="" disabled="disabled">
		                <button class="btn-clear" tabindex="-1"></button>
	                </div>
	                
                </div>
                <div class="span6">
                    <label>Seksi</label>
	                <div class="input-control text" data-role="input-control">
		                <input type="text" name="vsection" value="" disabled="disabled">
		                <button class="btn-clear" tabindex="-1"></button>
	                </div>
	                <label>Judul Ide Proposal</label>
	                <div class="input-control textarea">
		                <textarea name="vtemaip"></textarea>
	                </div>
                    <label>Kategori</label>
	                <div class="input-control text" data-role="input-control">
		                <input type="text" name="vtag" value="">
		                <button class="btn-clear" tabindex="-1"></button>
	                </div>
	                <label>Total Nilai</label>
	                <div class="input-control text" data-role="input-control">
		                <input type="text" name="ntotal" value="" maxlength="18">
		                <button class="btn-clear" tabindex="-1"></button>
	                </div>
	                <label>Cost Down</label>
	                <div class="input-control text" data-role="input-control">
		                <input type="text" name="ncostdown" value="" maxlength="18">
		                <button class="btn-clear" tabindex="-1"></button>
	                </div>
	                <label>Reward</label>
	                <div class="input-control text" data-role="input-control">
		                <input type="text" name="nreward" value="" maxlength="18">
		                <button class="btn-clear" tabindex="-1"></button>
	                </div>
	                <label>Variance Cost-Reward</label>
	                <div class="input-control text" data-role="input-control">
		                <input type="text" name="nvariance" value="" maxlength="18">
		                <button class="btn-clear" tabindex="-1"></button>
	                </div>
                </div>
                </div>
                <div class="main-form-toolbar-bottom">
                    <button type="submit" class="medium primary" onclick="_fw_postData(this,'.sub-page[data-section=\'form\']')" >
	                    <span class="icon-floppy"></span>
                        Save Data
                    </button>
                </div>
            </div>
        </div>
        <div class="sub-page" data-section="lookup-member" data-path="Ide Proposal>Registrasi Ide Proposal>Pilih Peserta" data-url="apps/ahmic/pages/AHMHRIRSL01.aspx?mode=ip">

        </div>
    </div>
</div>
<script type="text/javascript">
    function ahmhrirsf04_openMemberLookup(obj) {
        var obj = $(obj);
        var fkey = obj.prev().attr('name') == "vnama" ? "filter_nama" : 'filter_nrp';
        var fval = obj.prev().val();
        var frm = obj.closest('.sub-page');
        var ofrm = obj.closest('.tab-frame');
        var lookupFrm = $('.sub-page[data-section="lookup-member"]', ofrm);
        var param = { 'filter_nama': '', 'filter_nrp': '' }
        param[fkey] = fval;
        _fw_loadSubPage(lookupFrm, param);
        _fw_navigateSubPage(obj, 'lookup-member');
    }
    function ahmhrirsl01_select(obj) {
        var obj = $(obj);
        var ofrm = obj.closest('.tab-frame');
        var nrp = $('td[data-field-id="vnrp"] .field-value', obj.closest('tr')).text();
        var nama = $('td[data-field-id="vnama"] .field-value', obj.closest('tr')).text();
        var ngolongan = $('td[data-field-id="ngolongan"] .field-value', obj.closest('tr')).text();
        var varea = $('td[data-field-id="varea"] .field-value', obj.closest('tr')).text();
        var vdirektorat = $('td[data-field-id="vdirektorat"] .field-value', obj.closest('tr')).text();
        var vdivisi = $('td[data-field-id="vdivisi"] .field-value', obj.closest('tr')).text();
        var vdepartment = $('td[data-field-id="vdepartment"] .field-value', obj.closest('tr')).text();
        var vsection = $('td[data-field-id="vsection"] .field-value', obj.closest('tr')).text();
        var frameTarget = $('.sub-page[data-section="form"]');
        $('input[name="vnrp"]', frameTarget).val(nrp);
        $('input[name="vnama"]', frameTarget).val(nama);
        $('input[name="ngolongan"]', frameTarget).val(ngolongan);
        $('input[name="varea"]', frameTarget).val(varea);
        $('input[name="vdirektorat"]', frameTarget).val(vdirektorat);
        $('input[name="vdivisi"]', frameTarget).val(vdivisi);
        $('input[name="vdepartment"]', frameTarget).val(vdepartment);
        $('input[name="vsection"]', frameTarget).val(vsection);
        _fw_navigateSubPage(obj, 'form');
    }
</script>